package band.wukong.practice.dubbo.quickstart;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * @author wukong(wukonggg@139.com)
 */
public class EchoServiceProvider {

    private static final Logger logger = LoggerFactory.getLogger(EchoServiceProvider.class);

    static {
        System.setProperty("dubbo.application.logger","slf4j");
    }

    public static void main(String[] args) {
        final String[] LOCATION = new String[]{"META-INF/spring/**/*.xml"};
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(LOCATION);
        context.start();


        logger.info("提供者服务已注册成功!");
        logger.info("请按任意键取消提供者服务!");

        try {
            System.in.read();//让此程序一直跑，表示一直提供服务
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
